<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<link href="../js/iCheck/skins/minimal/minimal.css" rel="stylesheet">
<link href="../js/iCheck/skins/square/square.css" rel="stylesheet">
<link href="../js/iCheck/skins/square/red.css" rel="stylesheet">
<link href="../js/iCheck/skins/square/blue.css" rel="stylesheet">
<link href="../css/clndr.css" rel="stylesheet">
<link rel="stylesheet" href="../js/morris-chart/morris.css">
<!--common-->
<link href="../css/style.css" rel="stylesheet">
<link href="../css/style-responsive.css" rel="stylesheet">
<c:set var="ctxPath" value="${pageContext.request.contextPath}"
	scope="application" />
<section>
	<!-- 右上角 -->
	<shiro:user>
		<div class="header-section">
			<a class="toggle-btn"><i class="fa fa-bars"></i></a>
			<div class="menu-right">
				<ul class="notification-menu">
					<li class="list"><a href="#"
						class="btnone btn btn-default dropdown-toggle"
						data-toggle="dropdown" aria-expanded="true"> ${nikeName} <span
							class="caret"></span>
					</a>
						<ul class="dropdown-menu dropdown-menu-usermenu pull-right">
							<li class="open"><a href="javascript:logout()"
								class="btn btn-default dropdown-toggle">注销</a></li>
						</ul></li>
				</ul>
			</div>
		</div>
	</shiro:user>
	<!-- 右上角结束 -->
	<div class="left-side sticky-left-side">
		<!--图标-->
		<div class="logo">
			<a href="${ctxPath }/login/toWelcome.do"><img
				src="../images/logo.png" alt=""></a>
		</div>
		<div class="logo-icon text-center">
			<a href="${ctxPath }/login/toWelcome.do"><img
				src="../images/logo.png" alt=""></a>
		</div>
		<div class="left-side-inner">
			<!--左侧菜单栏-->
			<ul class="nav nav-pills nav-stacked custom-nav">
				<li id="welcome"><a href="../login/toWelcome.do"><i
						class="fa fa-home"></i> <span>欢迎页</span></a></li>
				<li id="orders" class="menu-list"><a href=""><i
						class="fa fa-book"></i> <span>订单管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="newOrders"><a
							href="../orders/toNewOrders.do?currentPage=1&status=15&afterSale=0">我的订单</a></li>
						 <li id="goingOrders"><a href="../orders/toCeIndent.do?currentPage=1&status=0">测量订单</a></li>
                        <li id="indentOfInstall"><a href="../orders/toIndentOfInstall.do?currentPage=1&status=0">安装订单</a></li> 
                        <li id="customerServiceOrders"><a href="../orders/getGoodsOfAfterSale.do?currentPage=1&status=0">售后管理</a></li>
					</ul></li>

				<li class="menu-list" id="member"><a href=""><i
						class="fa fa-book"></i> <span>会员管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="customer"><a
							href="../member/customer.do?currentPage=1">顾客管理</a></li>

						<li id="dealer"><a href="../member/dealer.do?currentPage=1">
								商家管理 </a></li>
                        <li id="supplier"><a href="../member/supplier.do?currentPage=1">供应商管理</a></li>
                        <li id="worker"><a href="../member/worker.do?currentPage=1">工人管理</a></li>   
                        <!--  <li id="business"><a href="../member/business.do?currentPage=1">商家管理</a></li>    -->       
					</ul></li>

				<li class="menu-list" id="account"><a href=""><i
						class="fa fa-book"></i> <span>账号管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="pwd"><a href="../login/toModifyPwd.do">修改密码</a></li>
					</ul>
					<ul class="sub-menu-list" style="display: none;">
						<li id="pwd"><a href="../login/toAccountManage.do?currentPage=1">账号管理</a></li>
					</ul>
					</li>
				<li id="shoppingmall" class="menu-list"><a href="#"><i
						class="fa fa-book"></i> <span>商城管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="goods"><a href="../shoppingmall/toState.do">商品管理</a></li>
						<li id="activity"><a
							href="../shoppingmall/activity.do?currentPage=1">活动管理</a></li>
						<li id="style"><a
							href="../shoppingmall/style.do?currentPage=1">风格管理</a></li>
						<li id="location"><a
							href="../shoppingmall/location.do?currentPage=1">适用场景管理</a></li>
						<li id="type"><a href="../shoppingmall/type.do?currentPage=1">商品类别管理</a></li>
						<li id="territory"><a
							href="../shoppingmall/territory.do?currentPage=1">开通区域管理</a></li>
					</ul></li>
				<li class="menu-list" id="app"><a href=""><i
						class="fa fa-book"></i> <span>APP管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="appAd"><a href="../app/appAd.do?currentPage=1">APP启动广告</a></li>
						<li id="appBasicInformation"><a
							href="../app/appBasicInformation.do?currentPage=1">APP基础信息</a></li>
					</ul></li>
			<!--  
				<li class="menu-list" id="member"><a href=""><i
						class="fa fa-book"></i> <span>会员管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="customer"><a
							href="../member/customer.do?currentPage=1">顾客管理</a></li>
						<li id="dealer"><a href="../member/dealer.do?currentPage=1">
								经销商管理 </a></li>
						<li id="supplier"><a
							href="../member/supplier.do?currentPage=1">供应商管理</a></li>
						<li id="worker"><a href="../member/worker.do?currentPage=1">工人管理</a></li>
						<li id="business"><a
							href="../member/business.do?currentPage=1">商家管理</a></li>
					</ul></li>
				-->
				<li class="menu-list" id="purchaseM"><a href="#"><i
						class="fa fa-book"></i> <span>采购管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="purchase"><a
							href="../purchaseM/purchase.do?currentPage=1">采购</a></li>
					</ul></li>
			<!-- 
				<li class="menu-list" id="taskManage"><a href=""><i
						class="fa fa-book"></i> <span>任务管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="measure"><a
							href="../taskManage/measure.do?currentPage=1">下测量单</a></li>
						<li id="repair"><a
							href="../taskManage/repair.do?currentPage=1">下维修单</a></li>
						<li id="install"><a
							href="../taskManage/install.do?currentPage=1">下安装单</a></li>
						<li id="make"><a href="../taskManage/make.do?currentPage=1">下制作单</a></li>
					</ul></li>-->
				<!-- 
				<li class="menu-list" id="money"><a href=""><i
						class="fa fa-book"></i> <span>资金管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="memberMoney"><a
							href="../money/memberMoney.do?currentPage=1">会员资金管理</a></li>
						<li id="moneyFlow"><a
							href="../money/moneyFlow.do?currentPage=1">查看资金流向记录</a></li>
					</ul></li>
				 -->
				<li class="menu-list" id="message"><a href=""><i
						class="fa fa-book"></i> <span>消息管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="customerMessage"><a
							href="../message/customerMessage.do?currentPage=1">顾客消息</a></li>
						<li id="workerMessage"><a
							href="../message/workerMessage.do?currentPage=1">工人消息</a></li>
						<li id="dealerMessage"><a
							href="../message/dealerMessage.do?currentPage=1">经销商消息</a></li>
						<li id="supplierMessage"><a
							href="../message/supplierMessage.do?currentPage=1">供货商消息</a></li>
						<li id="businessMessage"><a
							href="../message/businessMessage.do?currentPage=1">商家消息</a></li>
						<li id="factoryMessage"><a
							href="../message/factoryMessage.do?currentPage=1">工厂消息</a></li>
					</ul></li>
				<li class="menu-list" id="coupons"><a href=""><i
						class="fa fa-book"></i> <span>优惠卷管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="couponsSet"><a
							href="../coupons/couponsSet.do?currentPage=1&&forWho=3">优惠卷设置</a></li>
					</ul></li>
				
				<li class="menu-list" id="factory"><a href=""><i
						class="fa fa-book"></i> <span>工厂管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="factoryOrders"><a
							href="../factory/makeManage.do?currentPage=1">工厂订单</a></li>

					</ul></li>
				<!-- 
				<li class="menu-list"><a href=""><i class="fa fa-book"></i>
						<span>其他管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li><a href="#">暂未开通</a></li>
					</ul></li> -->
				<!--  
				<li class="menu-list" id="data"><a href=""><i
						class="fa fa-book"></i> <span>数据统计管理</span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="customerData"><a
							href="../data/customerData.do?currentPage=1">用户信息统计</a></li>
						<li id="workerData"><a
							href="../data/workerData.do?currentPage=1">工人信息统计</a></li>
						<li id="dealerData"><a
							href="../data/dealerData.do?currentPage=1">经销商信息统计</a></li>
						<li id="supplierData"><a
							href="../data/supplierData.do?currentPage=1">供货商信息统计</a></li>
						<li id="businessData"><a
							href="../data/businessData.do?currentPage=1">商家信息统计</a></li>
						<li id="factoryData"><a
							href="../data/factoryData.do?currentPage=1">工厂信息统计</a></li>
						<li id="customerServiceData"><a
							href="../data/customerServiceData.do?currentPage=1">售后数据统计</a></li>
					</ul></li>
					-->
				<%-- 	<shiro:hasAnyRoles name="admin,root,declar">
					<li class="menu-list"><a href=""><i class="fa fa-book"></i>
							<span>库存管理</span></a>
						<ul class="sub-menu-list" style="display: none;">
							<li><a href="#">暂未开通</a></li>
						</ul></li>
				</shiro:hasAnyRoles> --%>
				<shiro:hasAnyRoles name="admin,root,declar">
					<li class="menu-list"><a href=""><i class="fa fa-book"></i>
							<span>商品原材料管理</span></a>
						<ul class="sub-menu-list" style="display: none;">
							<li><a href="#">暂未开通</a></li>
						</ul></li>
				</shiro:hasAnyRoles>
				<shiro:hasAnyRoles name="admin,root">
					<li class="menu-list"><a href=""><i class="fa fa-book"></i>
							<span>权限管理</span></a>
						<ul class="sub-menu-list" style="display: none;">
							<li><a href="#">暂未开通</a></li>
						</ul></li>
				</shiro:hasAnyRoles>
				<li class="menu-list" id="wallet"><a href="#"> <i
						class="fa fa-jpy"></i><span style="color: yellow" id="toMoney"></span></a>
					<ul class="sub-menu-list" style="display: none;">
						<li id="rechargeModalLabel"><a href="#"
							onclick="javascript:$('#rechargeModal').modal('show');">充值</a></li>
						<li id="withDrawalMoney"><a
							href="${ctxPath}/login/withDrawalMoney.do">提现</a></li>
					</ul></li>
			</ul>
			<!--sidebar nav end-->

		</div>
	</div>
</section>
<!-- 弹出操作之后的提示框 -->
<input id="menus" hidden="hidden" type="button"
	class="btn btn-secondary" data-toggle="modal" data-target="#mmm"
	value="弹窗" />
<div id="mmm" style="" class="modal fade animate in"
	data-backdrop="true">
	<div id="alerts" class="panel-body"></div>
</div>
<!-- Placed js at the end of the document so the pages load faster -->
<jsp:include page="../wallet/rechargeModal.jsp"></jsp:include>
<script src="../js/jquery-1.10.2.min.js"></script>
<script src="../js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="../js/jquery-migrate-1.2.1.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/modernizr.min.js"></script>
<script src="../js/jquery.nicescroll.js"></script>
<!--easy pie chart-->
<script src="../js/easypiechart/jquery.easypiechart.js"></script>
<!--Sparkline Chart-->
<script src="../js/sparkline/jquery.sparkline.js"></script>
<script src="../js/sparkline/sparkline-init.js"></script>
<!--icheck -->
<script src="../js/iCheck/jquery.icheck.js"></script>
<!-- jQuery Flot Chart-->
<script src="../js/flot-chart/jquery.flot.js"></script>
<script src="../js/flot-chart/jquery.flot.tooltip.js"></script>
<script src="../js/flot-chart/jquery.flot.resize.js"></script>
<!--Morris Chart-->
<script src="../js/morris-chart/raphael-min.js"></script>
<!--Calendar-->
<script src="../js/calendar/clndr.js"></script>
<!-- <script src="../js/calendar/evnt.calendar.init.js"></script> -->
<script src="../js/calendar/moment-2.2.1.js"></script>
<script
	src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<!--common scripts for all pages-->
<script src="../js/scripts.js"></script>
<script>
	$(function() {
		$.get("../login/myWallet.do", function(data, status) {
			if (!data) {
				data = '0.00';
			}
			$("#toMoney").empty().html("钱包：" + data);
		})
	});
	$(".list .btnone").toggle(function() {
		$(this).parent("li").addClass("open");
	}, function() {
		$(this).parent("li").removeClass("open");
	})
	function indexmenu(oneMenu, twoMenu) {
		$("#" + twoMenu).attr("class", "active");
		var sub = $("#" + oneMenu).find('>ul'); //原来是查ul
		visibleSubMenuClose();
		$("#" + oneMenu).addClass('nav-active');
		sub.slideDown(0, function() {
			mainContentHeightAdjust();
		});
	}
	function mainContentHeightAdjust() {
		// Adjust main content height
		var docHeight = jQuery(document).height();
		if (docHeight > jQuery('.main-content').height())
			jQuery('.main-content').height(docHeight);
	}
	function visibleSubMenuClose() {
		jQuery('.menu-list').each(function() {
			var t = jQuery(this);
			if (t.hasClass('nav-active')) {
				t.find('> ul').slideUp(200, function() {
					t.removeClass('nav-active');
				});
			}
		});
	}
	function logout() {
		Ewin.confirm({
			message : "确认要退出登录吗！"
		}).on(function(e) {
			if (!e) {
				return;
			} else {
				window.location.href = '${ctxPath }/login/logout.do';
			}
		});
	}
</script>
<script src="${ctxPath}/js/useful-ewin/Ewin.js"></script>